@extends('home.layout')
@section('right')
<script type="text/javascript" src="{{ asset('/js/jquery-1.8.3.min.js') }}"></script>
<div class="span16">
    <div class="protal-content-update hide">
        <div class="protal-username">
        @if(empty($data->name))
            {{ $data->email }}
        @else
            {{ $data->username }}
        @endif
        </div>
        <p class="msg">
            我们做了一个小升级：你的用户名可以直接修改啦，去换个酷炫的名字吧。
            <a data-stat-id="a7bae9e996d7d321" href="#" target="_blank">立即前往&gt;</a>
        </p>
    </div>
    <div class="uc-box uc-main-box">
        <div class="uc-content-box portal-content-box">
            <div class="box-bd">
                <div class="portal-main clearfix">
                    <div class="user-card">
                        <h2 class="username">
                            @if(empty($data->name))
                                {{ $data->email }}
                            @else
                                {{ $data->username }}
                            @endif
                        </h2>
                        <p class="tip">您好～</p>
                        <a data-stat-id="4b099f76f8f470d2" class="link" href="{{ asset('/home/user/center') }}" target="_blank">修改个人信息 &gt;</a>
                        <img class="avatar" src="{{ $data->pic }}" alt="" height="150" width="150"></div>
                    <div class="user-actions">
                        <ul class="action-list">
                            <li>
                                账户安全：
                                <span class="level level-2">普通</span>
                            </li>
                            <li>
                                绑定邮箱：
                                <span class="tel">{{ $data->email }}</span>
                                <a data-stat-id="f51e486b2c529448" class="btn btn-small btn-primary" href="{{ asset('/home/safe') }}" target="_blank">绑定</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="portal-sub">
                    <ul class="info-list clearfix">
                        <li>
                            <h3>
                                待支付的订单：
                                <span class="num">
                                @if($str == 0 )
                                    0
                                @else
                                   {{ substr_count($str,'0') }}
                                @endif 
                                </span>
                            </h3>
                            <a data-stat-id="dd6496f77a167a5d" href="{{ url('home/order/myorder') }}">
                                查看待支付订单 <i class="iconfont"></i>
                            </a>
                            <img src="{{ asset('/images/portal-icon-1.png') }}" alt=""></li>
                        <li>
                            <h3>
                                待收货的订单：
                                <span class="num">
                                   {{ substr_count($str,'1') }} 
                                </span>
                            </h3>
                            <a data-stat-id="92fa860987c1c734" href="{{ url('home/order/myorder') }}">
                                查看待收货订单 <i class="iconfont"></i>
                            </a>
                            <img src="{{ asset('/images/portal-icon-2.png') }}" alt=""></li>
                        <li>
                            <h3>
                                待评价商品数：
                                <span class="num">
                                   {{ substr_count($str,'2') }} 
                                </span>
                            </h3>
                            <a data-stat-id="b4a31da3923196c8" href="{{ url('home/order/myorder') }}">
                                查看待评价商品
                                <i class="iconfont"></i>
                            </a>
                            <img src="{{ asset('/images/portal-icon-3.png') }}" alt=""></li>
                        <li>
                            <h3>
                                喜欢的商品：
                                <span class="num">
                                {{ count($dat)}}
                                </span>
                            </h3>
                            <a data-stat-id="e7f60a4653081c02" href="{{ url('home/user/mylike') }}">
                                查看喜欢的商品
                                <i class="iconfont"></i>
                            </a>
                            <img src="{{ asset('/images/portal-icon-4.png') }}" alt=""></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection('right')